import request from "@/request/request";

// 资源列表
export function resourceList(params) {
  return request({
    url: "/dev-api/others/sharing/list",
    method: "get",
    params,
  });
}
// 资源列表-新增
export function resourceAdd(data) {
  return request({
    url: "/dev-api/others/sharing",
    method: "post",
    data,
  });
}
// 资源列表-修改
export function resourceEdit(data) {
  return request({
    url: "/dev-api/others/sharing",
    method: "put",
    data,
  });
}
// 资源列表-详情
export function resourceDetail(id) {
  return request({
    url: "/dev-api/others/sharing/" + id,
    method: "get",
  });
}
// 资源列表-删除
export function resourceDelete(id) {
  return request({
    url: "/dev-api/others/sharing/batch/" + id,
    method: "DELETE",
  });
}
// 资源列表-合同上传
export function resourceContract(data) {
  return request({
    url: "/dev-api/others/sharing/submat",
    method: "post",
    data,
  });
}
// 在线沟通-联系人列表
export function contactsList(params) {
  return request({
    url: "/dev-api/others/chatRoom/linkmanContacts",
    method: "get",
    params,
  });
}
// 在线沟通-上传合同联系人列表
export function contactsListUpload(params) {
  return request({
    url: "/dev-api/others/chatRoom/contractren",
    method: "get",
    params,
  });
}
// 在线沟通-聊天室列表
export function chatRoomList(params) {
  return request({
    url: "/dev-api/others/chatRoom/list",
    method: "get",
    params,
  });
}
// 在线沟通-发送消息
export function chatSend(data) {
  return request({
    url: "/dev-api/others/chatRoom",
    method: "post",
    data,
  });
}

// 在线沟通-判断联系人是否重复联系
export function chatIs(params) {
  return request({
    url: "/dev-api/others/chatRoom/checkout",
    method: "get",
    params,
  });
}

// 资源共享-下架
export function resourceOffshelf(data) {
  return request({
    url: "/dev-api/others/sharing/undercarriage",
    method: "post",
    data,
  });
}

// 资源列表不登录
export function resourceListNo(params) {
  return request({
    url: "/dev-api/others/sharing/selelist",
    method: "get",
    params,
    headers: {
      tenantId: "1743924387074326530",aaa_a:"aaa",
      soureName: "11af56432aba484486704925266b50cd",
    },
  });
}
// 资源列表-详情不登录
export function resourceDetailNo(id) {
  return request({
    url: "/dev-api/others/sharing/info/"+id,
    method: "get",
    headers: {
      tenantId: "1743924387074326530",aaa_a:"aaa",
      soureName: "11af56432aba484486704925266b50cd",
    },
  });
}